import Vue from 'vue'
import App from './App.vue'
import router from './router'
import store from './store'
import ElementUI from 'element-ui';
import ECharts from 'vue-echarts'
import 'echarts';
import axios from 'axios'
import VueAxios from 'vue-axios'
import VueRouter from 'vue-router';

Vue.use(VueRouter)
// 解决ElementUI导航栏中的vue-router在3.0版本以上重复点菜单报错问题
const originalPush = VueRouter.prototype.push
VueRouter.prototype.push = function push (location) {
  return originalPush.call(this, location).catch(err => err)
}

Vue.use(VueAxios, axios)

// 全局注册组件（也可以使用局部注册）
Vue.component("ECharts", ECharts);

Vue.config.productionTip = false

Vue.use(ElementUI);

let vue = new Vue({
  router,
  store,
  render: h => h(App)
}).$mount('#app')

export default vue
